package com.lidong.producer.service;

import java.util.concurrent.TimeUnit;

public class Test {
    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        try {
//            TimeUnit.MILLISECONDS.sleep(2000);
            Thread.sleep(2000);
            long end = System.currentTimeMillis();
            System.out.println((-start+end));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
